using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Zosnn.Models.Mapping;

namespace Zosnn.Models
{
    public partial class ZosnnContext : DbContext
    {
        static ZosnnContext()
        {
            Database.SetInitializer<ZosnnContext>(null);
        }

        public ZosnnContext()
            : base("Name=ZosnnContext")
        {
        }

        public DbSet<Collect> Collects { get; set; }
        public DbSet<Order> Orders { get; set; }
        public DbSet<OrderInfo> OrderInfoes { get; set; }
        public DbSet<Product> Products { get; set; }
        public DbSet<ProductInfo> ProductInfoes { get; set; }
        public DbSet<ProductType> ProductTypes { get; set; }
        public DbSet<Seller> Sellers { get; set; }
        public DbSet<SellerArea> SellerAreas { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<User> Users { get; set; }
        public DbSet<UserInfo> UserInfoes { get; set; }
        public DbSet<WebUser> WebUsers { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CollectMap());
            modelBuilder.Configurations.Add(new OrderMap());
            modelBuilder.Configurations.Add(new OrderInfoMap());
            modelBuilder.Configurations.Add(new ProductMap());
            modelBuilder.Configurations.Add(new ProductInfoMap());
            modelBuilder.Configurations.Add(new ProductTypeMap());
            modelBuilder.Configurations.Add(new SellerMap());
            modelBuilder.Configurations.Add(new SellerAreaMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new UserMap());
            modelBuilder.Configurations.Add(new UserInfoMap());
            modelBuilder.Configurations.Add(new WebUserMap());
        }
    }
}
